package bpm.dao.impl.document;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bpm.domain.document.DocumentNote;
/**
 * 
 * @author ZhaoWangLong Jul 26, 2011
 *
 */
public class DocumentNoteRowMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int i) throws SQLException {
		DocumentNote docNote=new DocumentNote();
		docNote.setId(rs.getString("ID"));
		docNote.setWorkItemId(rs.getInt("WORKITEM_ID"));
		docNote.setDocumentId(rs.getString("DOC_ID"));
		docNote.setFieldKey(rs.getString("FIELD_KEY"));
		docNote.setValue(rs.getString("VALUE"));
		docNote.setAuthorId(rs.getString("AUTHOR_ID"));
		docNote.setAuthorName(rs.getString("AUTHOR_NAME"));
		docNote.setDeptId(rs.getString("DEPT_ID"));
		docNote.setDeptName(rs.getString("DEPT_NAME"));
		docNote.setCreateTime(rs.getDate("CREATE_TIME"));
		docNote.setLastUpdateTime(rs.getDate("LAST_UPDATE_TIME"));
		docNote.setDescription(rs.getString("DESCRIPTION"));
		docNote.setScope(rs.getString("SCOPE"));
		return docNote;
	}

}
